import Vue from 'vue'
import Router from 'vue-router'
import * as u from '@/util/util'

Vue.use(Router)

//静态路由
export const staticRouter = [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: "登录"
    },
    component: () => import( '@/view/login')
  },
  {
    path: '/',
    name: 'admin',
    redirect: '/sy',
    component: () => import( '@/view/admin'),
    children: [
      {
        path: '/sy',
        name: '首页',
        component: () => import('@/view/sy.vue')
      },
    ]
  },
  {
    path: '/screen/:id',
    name: 'screen',
    meta: {
      title: "构建大屏"
    },
    component: () => import( '@/view/screen/index')
  },
  {
    path: '/screenView/:id',
    name: 'screenView',
    meta: {
      title: "预览大屏"
    },
    component: () => import( '@/view/screen/view')
  },
]

const createRouter = () => new Router({
  routes:staticRouter
})

export const router = createRouter()




